Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Import annotations into a datasource #504

Merged
merged 7 commits into from
Aug 26, 2024

Conversation

kbolashev
Copy link
Member

@kbolashev kbolashev commented Jul 18, 2024

Adds ability to import annotations into a datasource.

Example with https://dagshub.com/Dean/COCO_1K (try out on a fork):

ds.import_annotations_from_files(
    annotation_type="yolo",
    path="custom_coco.yaml",
    field="imported_annotations",
    yolo_type="segmentation"
)

Copy link

dagshub bot commented Jul 18, 2024

Copy link
Contributor

@EvgeniLeonti EvgeniLeonti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

don't forget about the # FIXME

@EvgeniLeonti
Copy link
Contributor

Trying to test within the client's source code, using this test.py file:

from dagshub.data_engine import datasources

ds = datasources.get_datasource("evgeni/COCO_1K", "images")

ds.import_annotations_from_files(
    annotation_type="yolo",
    annotations_path="custom_coco.yaml",
    annotations_field="imported_annotations",
    yolo_type="segmentation",
)

resulting with

TypeError: Datasource.import_annotations_from_files() missing 1 required positional argument: 'path'

Am I doing smth wrong?

@kbolashev kbolashev merged commit 764dbec into master Aug 26, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants